<template>
  <div>
    <el-dialog
      v-model="Visible"
      width="40%"
      :title="title"
      :close-on-click-modal="false"
      @close="handleclose"
    >
      <el-form label-width="100px">
        <el-form-item :label="title1" :required="true">
          <el-select
            v-model="Refused.dealReason"
            placeholder="请选择"
            style="width: 100%"
          >
            <el-option
              v-for="item in refuseList"
              :key="item.paramName"
              :label="item.paramName"
              :value="item.paramName"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="title2">
          <el-input v-model="Refused.dealRemark" type="textarea"></el-input>
        </el-form-item>
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="Visible = false">取 消</el-button>
          <el-button type="primary" @click="handleSaveEdit">确定</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script>
import { ref, reactive } from "vue";
export default {
  setup(props, context) {
    const Visible = ref(context.attrs.Visible);
    const refuseList = ref(context.attrs.refuseList);
    const title = ref(context.attrs.title);
    const title1 = ref(context.attrs.title1);
    const title2 = ref(context.attrs.title2);
    const orderId = ref(context.attrs.orderId);
    const Refused = reactive({
      id: orderId.value,
      dealReason: "",
      dealRemark: "",
    });
    const handleclose = () => {
      Visible.value = false;
      context.emit("handleclose", Visible.value);
    };
    const handleSaveEdit = () => {
      context.emit("handleSaveEdit", Refused);
    };
    return {
      orderId,
      title,
      title1,
      title2,
      refuseList,
      Visible,
      Refused,
      handleclose,
      handleSaveEdit,
    };
  },
};
</script>
<style lang="less" scoped>
&:deep(.el-input__inner) {
  color: #333;
}
</style>
